package com.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: H_tao_X
 * Date: 2022-11-17
 * Time: 23:14
 */
@Controller
public class UserController2 {
    // 属性注入
    // 1. 先定义一个 需要注入的对象
    @Autowired
    private UserService userService;
    public void sayHi() {
        userService.sayHi();
    }
}
